package com.wyp.service.impl;

import com.wyp.mapper.ApartmentsMapper;
import com.wyp.pojo.Apartments;
import com.wyp.service.ApartmentsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class ApartmentsServiceImpl implements ApartmentsService {

    @Autowired
    private ApartmentsMapper apartmentsMapper;

    @Override
    public List<Apartments> qureyAllApartment() {
        return apartmentsMapper.qureyAllApartment();
    }

    @Override
    public Apartments qureyApartmentById(int apartmentid) {
        return apartmentsMapper.qureyApartmentById(apartmentid);
    }

    @Override
    public Apartments findByapartname(String apartmentname) {
        return apartmentsMapper.findByapartname(apartmentname);
    }

    @Override
    public int addApartment(Apartments apartments) {
        return apartmentsMapper.addApartment(apartments);
    }

    @Override
    public int updateApartment(Apartments apartments) {
        return apartmentsMapper.updateApartment(apartments);
    }
}
